<?php

class Welcome extends Controller {

	function Welcome()
	{
		parent::Controller();	
	}
	
	function index()
	{
		$this->load->view('welcome_message');
	}
	
	function sendemail(){
		$config = $this->config->item('form_email');
		  $this->load->library('email');
		  $this->email->initialize($config);
		  
		  $message = '<div align="center">
	<img src="http://farm5.static.flickr.com/4029/4646851796_9353ec1159_o.jpg" width="800" height="717" usemap="#linkmap" border="0"/>
	<img src="http://farm5.static.flickr.com/4027/4647690840_80b5ff784b_o.jpg" width="800" height="717" border="0"/>	
	<a name="map">&nbsp;</a>
	<map name="linkmap">
		<area shape="rect" coords="50,330,750,450" href="#map" alt="Welcome to the new office" />
	</map>
</div>';
$from = "minhtri2711@gmail.com";
$name = "Minh Tri";
$subject = "Khong biet gi ca";

		  $this->email->from($from, $name);
		  $this->email->subject($subject);
		   $this->email->to('minhtri2711@gmail.com');

		  // Convert message to have images reference inline content-id's.
		  //$this->email->inline($message);

		  // This is like Email again:
		  $this->email->message($message);

		  $result = $this->email->send();
		  
		  echo $this->email->print_debugger();
		  return $result;
	}
}

/* End of file welcome.php */
/* Location: ./system/application/controllers/welcome.php */